package order.client;

import com.example.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "user-service", fallback = UserFallbackClient.class)
public interface UserClient {
    @GetMapping("/selectById")  // 根据id获取用户
    User selectById(@RequestParam(required = false,name = "id") Long id);
}
